<template>
  <div>
    <button @click="$emit('setName','a')">点击</button>
  </div>
</template>

<script setup>
const emit=defineEmits(['setName'])
const setName = () => {
  emit('setName','a')
}

</script>

<style lang="scss" scoped>

</style>